A flash memory may include metadata. The metadata may include a mapping table used for managing data stored in the flash memory, a data structure used for garbage collection, and the like.
In general, to enhance a performance of the flash memory, the metadata may be stored and managed in a static random access memory (SRAM) or a dynamic random access memory (DRAM) corresponding to a volatile memory. Thus, when a power failure unexpectedly occurs in a flash memory storage device, the metadata stored in the volatile memory may be lost.
To solve this issue, information for recovering the metadata may be stored in a spare space of a page of the flash memory on which the data is recorded. Alternatively, all of the metadata may be stored in a metadata storage area of the flash memory at each predetermined time interval.
In a method of storing information for recovering the metadata in the spare space, the flash memory storage device based on a compression may be insufficient to include all data for recovering the metadata in the spare space, due to a limitation on a size of the spare space. Also, the flash memory storage device may need to read an entire area of the flash memory to be recovered from a power failure and thus, a period of recovery time may increase according to an increase in a storage capacity of the flash memory storage device.
In a method of storing all of the metadata at each predetermined time interval, when the metadata is synchronized in the flash memory and the power failure occurs before a subsequent synchronization (sync) is initiated, a reliability of the metadata generated or changed after the most recent sync is performed may not be ensured. Thus, to ensure reliability, the metadata may need to be frequently synchronized in the flash memory.
However, an increase in the storage capacity of the flash memory storage device may lead to an increase in a quantity of the metadata used for managing the stored data and thus, a number of writings may be increased to sync the metadata in the flash memory. When the number of writings is increased, power consumption may be continued, which may affect a durability of the metadata area of the flash memory in which the metadata is stored. Also, reliability of the metadata may not be entirely ensured.
To reduce the power consumption and maintain the durability, changes in the metadata provided during the power failure may be included in a form of a log to be stored in the volatile memory and the data may be stored in the flash memory on a page-by-page basis. However, when the power failure occurs under a circumstance of the data being recorded on the flash memory, and the metadata not being recorded on the flash memory, a portion including a change in the metadata stored in the volatile memory may disappear. Thus, such a method may not entirely ensure the reliability of the metadata.
Korean Patent Publication No. 10-2010-0035328 published on Apr. 5, 2010 discloses a solid state drive (SSD) including a synchronization device. The SSD may include a controller of the flash memory and a synchronization device connected to a non-volatile memory. When a power supply to the SSD is suspended, the synchronization device may prevent the non-volatile memory from operating without a control of the controller.